<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>Javascript tests</title>
        <link rel="stylesheet" href="qunit.css">
    </head>
    <body>
        <div id="qunit"></div>
        <div id="qunit-fixture">
            <form>
                <input name="text" />
                <div class="has-error">Error text</div>
            </form>
        </div>
        <script src="jquery-1.10.2.min.js"></script>
        <script src="qunit.js"></script>
        <script src="list.js"></script>
        <script>
            /*global $, test, equal */
            /*test("smoke test", function () {
            equal(1, 1, "Maths works!");
            });

            test("add test",function(){
            equal(2+3, 6, "fail");
            });

            test("sub test",function(){
            equal(9-7, 2, "true");
            });*/

            test("div test",function(){
            equal(9/3, 3, "true");
            })

            /*test("smoke test", function () {
            equal($('.has-error').is(':visible'), true);
            $('.has-error').hide();
            equal($('.has-error').is(':visible'), false);
            });

            test("smoke test 2", function () {
            equal($('.has-error').is(':visible'), true);
            $('.has-error').hide();
            equal($('.has-error').is(':visible'), false);
            });*/

            test("errors should be hidden on keypress", function () {
            $('input').trigger('keypress');
            equal($('.has-error').is(':visible'), false);
            });

            test("errors not be hidden unless there is a keypress", function () {
            equal($('.has-error').is(':visible'), true);
            })
        </script>
    </body>
</html>